﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UIWindows.Attributes;
using UIWindows.GlobalStatics;
using XingLucifer.IBase.Enums;

namespace UIWindows.Services.Handle
{
    [TaskClass(TaskTypes.设备状态)]
    public class DeviceStatus : ServierBase
    {
        public DeviceStatus(DeviceConfigStatic deviceConfig, SystemConfigStatic systemConfig,
            UserConfigStatic userConfig, ParameterStatic parameterStatic, TemporaryStatic temporary, HomeStatic homeStatic)
            : base(deviceConfig, systemConfig, userConfig, parameterStatic, temporary, homeStatic)
        {

        }

        public override Task Handle(Context.DataContext context)
        {
            TaskService.Instance.RemoveTask(context);
            RunLog($"当前状态：[{_temporaryStatic.DeviceStatus[context.ServiceName]}]");
            return Task.CompletedTask;
        }
    }
}
